package com.xu.cloud.shorturl.config;

import com.xu.cloud.common.sequence.ISequence;
import com.xu.cloud.common.trace.SequenceTraceIdContext;
import com.xu.cloud.common.trace.TraceIdContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * traceId上下文配置
 *
 * @author xuguan
 * @since 2025/1/8
 */
@Configuration
public class TraceIdContextConfig {

    @Bean
    public TraceIdContext traceIdContext(ISequence sequence) {
        return new SequenceTraceIdContext(sequence);
    }
}
